package cn.cutie.clotcache.command;

import cn.cutie.clotcache.core.ClotCache;
import cn.cutie.clotcache.core.Command;
import cn.cutie.clotcache.core.Reply;

/**
 * @Description:
 * @Author: Cutie
 * @CreateDate: 2024/6/19 20:27
 * @Version: 0.0.1
 */
public class InfoCommand implements Command {
    private static final String INFO = "ClotCache server[v1.0.0], created by clot." + CRLF+
            "Mock Redis Server at 2024-06-12 in HZ." + CRLF;

    @Override
    public String name() {
        return "INFO";
    }

    @Override
    public Reply<?> exec(ClotCache cache, String[] args) {
        return Reply.bulkString(INFO);
    }
}
